package com.tomato.spring.framework.util;

import java.util.Collection;
import java.util.Map;

/**
 * <pre>
 *     集合判空
 * </pre>
 * @author tomato
 */
public class CollectionUtil {
    public static boolean isEmpty(Collection collection) {
        return collection == null || collection.isEmpty();
    }

    public static boolean isEmpty(Map map) {
        return map == null || map.isEmpty();
    }

    public static boolean isEmpty(Object[] arr) {
        return arr == null || arr.length == 0;
    }
}
